
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class LoadPage extends StatefulWidget {
  const LoadPage({Key? key}) : super(key: key);

  @override
  _LoadPageState createState() => _LoadPageState();
}

class _LoadPageState extends State<LoadPage> {
  // final _future = Future.delayed(Duration(seconds: 3), () {
  //   return Future.error('');
  // });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(''),
      ),
      body: ListView(
        children: const [
           UnconstrainedBox(
            child: CircularProgressIndicator(),
          ),
          UnconstrainedBox(
            child: RefreshProgressIndicator(
              backgroundColor: Colors.greenAccent,
              valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
              strokeWidth: 5.0,
            ),
          ),
          UnconstrainedBox(
            child: RefreshProgressIndicator(),
          ),
          UnconstrainedBox(
            child: CupertinoActivityIndicator(
              radius: 10,
            ),
          ),
          UnconstrainedBox(
            child: CircularProgressIndicator(
              // value: 0.3,
              backgroundColor: Colors.greenAccent,
              valueColor: AlwaysStoppedAnimation<Color>(Colors.red),
            ),
          ),
        ],
      ),
      // body: Container(
      //   child: FutureBuilder(
      //     future: _future,
      //     builder: (context, snapshot) {
      //       return Center(
      //         child: Container(
      //           height: 100,
      //           width: 100,
      //           decoration: BoxDecoration(
      //               border: Border.all(color: Colors.grey), borderRadius: BorderRadius.all(Radius.circular(10))),
      //           child: widget,
      //         ),
      //       );
      //     },
      //   ),
      // ),
    );
  }
}
